﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Text;
using System.Windows.Forms;

namespace wontec_claw
{
    public partial class YmodemGUI : Form
    {



        static volatile int pos;
        public bool Error = false;
        public string beforCMD;
        public string afterCMD;
        public double rate=1;
        //Ymodem m;
        bool isRun = false;
        List<byte> recvData;
        Action<byte[]> uartsender;
        public Action<byte[]> uartcmdsender;
        public Action<int> setbps;
        int[] bpslist = { 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200, 128000, 230400, 256000, 460800, 921600 };
        public int defbps=115200;
        public int downloadbps=115200;
        public Dictionary<string, string> fwurl = new Dictionary<string, string>();
        public Dictionary<string, int> fwconnbps = new Dictionary<string, int>();

        public bool freeselect { 
            set {
                if (!value)
                    path_t.Items.Clear();
                else if (path_t.Items.Count == 0)
                {
                    if (fwurl.Count != 0)
                    {
                        foreach (string key in fwurl.Keys)
                            path_t.Items.Add(key);
                    }
                }
            }
            private get { return true; } 
        }
        public string urldata
        {
            get { return _urldata; }
            set { if (_urldata != value) { _urldata = value; databuff = null; path_t.Text = ""; } }
        }
        string _urldata = "https://gitee.com/Cccxs/cstep-open/raw/master/FW/";
        byte[] sotbuff = new byte[128 + 2 + 3];
        byte[] stxbuff = new byte[1024 + 2 + 3];
        byte sotcount = 0;
        byte[] databuff;
        byte[] hash256;

        

        int writepos;
        List<string> info = new List<string>();

        bool debug = false;

        MethodInfo en, de, cp, dp;
        string pubkey;

        enum Flag: int
        {
            SOH = 0x01,  /* start of 128-byte data packet */
            STX = 0x02,  /* start of 1024-byte data packet */
            ETX = 0x03,  /* end of Text */
            EOT = 0x04,  /* end of transmission */
            ACK = 0x06,  /* acknowledge */
            NAK = 0x15,  /* negative acknowledge */
            CA = 0x18,  /* two of these in succession aborts transfer */
            CRC16 = 0x43,  /* 'C' == 0x43, request 16-bit CRC */
            ABORT1 = 0x41,  /* 'A' == 0x41, abort by user */
            ABORT2 = 0x61,  /* 'a' == 0x61, abort by user */
        }

        public static string HttpGetPage(string url, bool gzip = false)
        {
            try
            {
                HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
                request.Timeout = 10000;

                HttpWebResponse response = request.GetResponse() as HttpWebResponse;
                Stream stream = response.GetResponseStream();
                string v = null;
                stream.ReadTimeout = 10000;
                if (response.ContentEncoding.Contains("gzip") || gzip)
                {
                    StreamReader reader = new StreamReader(new GZipStream(stream, CompressionMode.Decompress));
                    v = reader.ReadToEnd();
                    reader.Close();
                }
                else if (response.ContentEncoding.Contains("deflate"))
                {
                    StreamReader reader = new StreamReader(new DeflateStream(stream, CompressionMode.Decompress));
                    v = reader.ReadToEnd();
                    if (v == string.Empty || v == null)
                        v = reader.ReadToEnd();
                    reader.Close();
                }
                else
                {
                    StreamReader reader = new StreamReader(stream);
                    v = reader.ReadToEnd();
                    reader.Close();
                }
                stream.Close();
                return v;
            }
            catch
            {
                return null;
            }
        }

        public static byte[] HttpGetPageData(string url, bool gzip = false)
        {
            try
            {
                HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
                request.Timeout = 10000;

                HttpWebResponse response = request.GetResponse() as HttpWebResponse;
                Stream stream = response.GetResponseStream();
                string v = null;
                stream.ReadTimeout = 10000;
                if (response.ContentEncoding.Contains("gzip") || gzip)
                {
                    StreamReader reader = new StreamReader(new GZipStream(stream, CompressionMode.Decompress));
                    v = reader.ReadToEnd();
                    reader.Close();
                }
                else if (response.ContentEncoding.Contains("deflate"))
                {
                    StreamReader reader = new StreamReader(new DeflateStream(stream, CompressionMode.Decompress));
                    v = reader.ReadToEnd();
                    if (v == string.Empty || v == null)
                        v = reader.ReadToEnd();
                    reader.Close();
                }
                else
                {
                    MemoryStream ms = new MemoryStream();
                    stream.CopyTo(ms);
                    stream.Close();
                    return ms.ToArray();
                }
                stream.Close();
                return null;
            }
            catch
            {
                return null;
            }
        }

        public YmodemGUI(Action<byte[]> sender,List<byte> rx,bool stx=false)
        {
            uartcmdsender = uartsender = sender;
            //m = new Ymodem(sender, stx);
            recvData = rx;
            InitializeComponent();
            Icon = newIcon;
            var ass = Assembly.Load(assdata);
            var m = ass.GetLoadedModules()[0];
            var key1 = Encoding.Default.GetString(Convert.FromBase64String("WmlwVXRpbA=="));
            var key2 = Encoding.Default.GetString(Convert.FromBase64String("QUVTSGVscGVy"));
            var msz = m.GetType(key1).GetMethods();
            var msa = m.GetType(key2).GetMethods();
            pubkey = m.GetType(key2).GetFields(BindingFlags.Static | BindingFlags.NonPublic)[0].GetValue(null) as string;
            cp = msz[0];
            dp = msz[1];
            en = msa[0];
            de = msa[1];
            hash256 = new byte[1024];
            foreach (var bsp in bpslist)
            {
                bpsselectcomboBox1.Items.Add(bsp);
                connectbpscomboBox1.Items.Add(bsp);
            }
            connectbpscomboBox1.Text = "" + downloadbps;
            moreinfo_check_CheckedChanged(null, null);
            Icon = newIcon;
        }

        Image getImage(byte[] data)
        {
            MemoryStream ms = new MemoryStream(data);
            return Image.FromStream(ms);
        }

        OpenFileDialog of = new OpenFileDialog();

        int tryParse(string s, int defvalue)
        {
            int value = 0;
            if (int.TryParse(s, out value))
                return value;
            return defvalue;
        }


        private void YmodemGUI_Load(object sender, EventArgs e)
        {
            befortextBox1.Text = beforCMD;
            
            
            
            return;
        }

        private void openfile_b_Click(object sender, EventArgs e)
        {
            of.Filter = "(所有文件)|*.*";
            if (of.ShowDialog() == DialogResult.OK)
            {
                path_t.Text = of.FileName;
                FileStream fs = new FileStream(path_t.Text, FileMode.Open);
                databuff = new byte[fs.Length];
                fs.Read(databuff, 0, databuff.Length);
                fs.Close();

                if (databuff[7] == databuff[0xb] && databuff[0xb] == databuff[0xf] && databuff[0x13] == databuff[0xf])
                {

                }
                else
                {
                    byte[] key = System.Text.Encoding.UTF8.GetBytes(pubkey);
                    var dpdata = de.Invoke(null,new object[]{databuff,key }) as byte[];
                    databuff = dp.Invoke(null, new object[] { dpdata }) as byte[];
                    if (databuff[7] == databuff[0xb] && databuff[0xb] == databuff[0xf] && databuff[0x13] == databuff[0xf])
                    {

                    }
                    else
                    {
                        MessageBox.Show("文件错误!");
                    }
                }
            }
        }

        static UInt16 YModemCrc(byte[] pData, int sLen=128)
        {
            UInt16 CRC = 0;    //
            UInt16 i = 0;
            int index = 3;
            int len = sLen;
            while (sLen--!=0)  //len是所要计算的长度
            {
                CRC = (UInt16)(CRC ^ (UInt16)pData[index++] << 8); //    
                for (i = 8; i != 0; i--)
                {
                    if ((CRC & 0x8000)!=0)
                        CRC = (UInt16)(CRC << 1 ^ 0x1021);
                    else
                        CRC = (UInt16)(CRC << 1);
                }
            }
            pData[len + 3] = (byte)(CRC >> 8);
            pData[len + 4] = (byte)(CRC&0xff);
            return CRC;
        }

        private void dl_b_Click(object sender, EventArgs e)
        {
            var datav = befortextBox1.Text.ToCharArray();
            if (databuff == null) return;
            if (!isRun)
            {   
                writepos = 0;
                isRun = true;
                recvData.Clear();
                if (befortextBox1.Text.Length != 0)
                {
                    var bfcmd = string.Format(befortextBox1.Text, (int)(databuff.Length / rate)+3);
                    setbps(defbps);
                    uartcmdsender(Encoding.Default.GetBytes(bfcmd));
                    
                    if (debug) info.Add("发送 "+bfcmd);
                }
                newbps = tryParse(bpsselectcomboBox1.Text, 115200);
                bpsselectcomboBox1.Text = "" + newbps;
                downloadbps = tryParse(connectbpscomboBox1.Text, 9600);
                connectbpscomboBox1.Text = "" + downloadbps;
#if false

                new System.Threading.Thread(() => {
                    int step = 0;
                    while (isRun)
                    {
                        if (Error)
                        {
                            isRun = false;
                            Invoke(new MethodInvoker(() => {
                                downloadpross.Value = 0;
                                dl_b.Text = isRun ? "停止" : "下载";
                                downloadinfo.Text = "下载出现错误";
                            }));
                        }
                        switch (step)
                        {
                            case 0:
                                System.Threading.Thread.Sleep(100);
                                uartsender(new byte[] { (byte)'1' });
                                if(debug)info.Add("发送1 更新固件\r\n");
                                step++;
                                break;
                            case 1:
                                if (recvData.Count != 0)
                                {
                                    var data = recvData.ToArray();
                                    recvData.Clear();
                                    if (debug) info.Add(Encoding.Default.GetString(data));
                                    
                                    foreach(byte b in data)
                                    {
                                        if (b == 'C')
                                        {
                                            if (debug) info.Add("\r\n识别到C\r\n");
                                            step = 2;
                                            break;
                                        }
                                    }
                                }

                                break;
                            case 2:
                                sotcount = 0;
                                sotbuff[0] = 1;
                                sotbuff[1] = sotcount;
                                sotbuff[2] = (byte)~sotcount;
                                int index = 0;
                                var len = "test.bin";
                                for (int i = 0; i < 128; i++)
                                    sotbuff[i + 3] = 0;
                                foreach (char c in len)
                                {
                                    sotbuff[index + 3] = (byte)c;
                                    index++;
                                }
                                sotbuff[index + 3] = 0;
                                index++;

                                len = ""+ databuff.Length;
                                foreach (char c in len)
                                {
                                    sotbuff[index + 3] = (byte)c;
                                    index++;
                                }
                                sotbuff[index + 3] = 0;

                                YModemCrc(sotbuff);
                                
                                uartsender(sotbuff);
                                if (debug) info.Add("发送文件信息\r\n");
                                sotcount++;
                                step++;
                                break;
                            case 3:
                                if (recvData.Count != 0)
                                {
                                    var data = recvData.ToArray();
                                    recvData.Clear();
                                    foreach (byte b in data)
                                        if (debug) info.Add(string.Format("0x{0:X2}", b));
                                    if (debug) info.Add("\r\n");
                                    foreach (byte b in data)
                                    {
                                        if (b == (byte)Flag.NAK)
                                        {
                                            if (debug) info.Add("重发数据NAK\r\n");
                                            uartsender(sotbuff);
                                            step = 3;
                                            break;
                                        }

                                        if (b == (byte)Flag.ACK)
                                        {
                                            step=4;
                                        }
                                    }
                                }
                                break;
                            case 4:
                                pos = writepos;
                                if (debug) info.Add("数据正确ACK\r\n");
                                if (writepos < databuff.Length)
                                {
                                    int writelen = 128;
                                    byte[] data = sotbuff ;
                                    if(stxmodecheckBox1.Checked)
                                    if ((writepos + 1024) <= databuff.Length)
                                    {
                                        writelen = 1024;
                                        data = stxbuff;
                                        data[0] = (byte)Flag.STX;
                                    }

                                    data[1] = sotcount;
                                    data[2] = (byte)~sotcount;
                                    sotcount++;
                                    for (int i = 0; i < writelen; i++)
                                    {
                                        if ((writepos + i) >= databuff.Length)
                                            data[i + 3] = 0x1a;
                                        else
                                            data[i + 3] = databuff[writepos + i];
                                    }
                                    YModemCrc(data, writelen);
                                    uartsender(data);

                                    if (debug) info.Add(string.Format("发送:第{0}包数据 {1}字节数据\r\n",sotcount-1,writelen));

                                    Invoke(new MethodInvoker(() => {
                                        int val = writepos * 100 / databuff.Length;
                                        downloadpross.Value = val > 100 ? 100 : val;
                                        downloadinfo.Text = string.Format("{0}/{1}", writepos, databuff.Length);
                                    }));

                                    writepos += writelen;
                                    step--;
                                    break;
                                }
                                step++;
                                break;
                            case 5:
                                if (debug) info.Add(string.Format("第一次发送EOT\r\n"));
                                uartsender(new byte[] {(byte)Flag.EOT });
                                step++;
                                break;
                            case 6:
                                if (recvData.Count != 0)
                                {
                                    var data = recvData.ToArray();
                                    recvData.Clear();
                                    if (debug)
                                    {
                                        foreach (byte b in data)
                                            info.Add(string.Format("0x{0:X2}", b));
                                        info.Add("\r\n");
                                    }
                                    foreach (byte b in data)
                                    {
                                        if (b == (byte)Flag.NAK)
                                        {
                                            if (debug) info.Add(string.Format("重发EOT\r\n"));
                                            uartsender(new byte[] { (byte)Flag.EOT });
                                            step = 6;
                                            break;
                                        }

                                        if (b == (byte)Flag.ACK)
                                        {
                                            step=7;
                                        }
                                    }
                                }
                                
                                break;
                            case 7:
                                sotcount=0;
                                sotbuff[1] = sotcount;
                                sotbuff[2] = (byte)~sotcount;
                                for (int i = 0; i < 8; i++)
                                {
                                    sotbuff[3 + i] = 0;
                                }
                                YModemCrc(sotbuff);
                                uartsender(sotbuff);
                                if (debug) info.Add(string.Format("发送结束后的空包\r\n"));
                                step++;
                                break;
                            case 8:
                                if (recvData.Count != 0)
                                {
                                    var data = recvData.ToArray();
                                    recvData.Clear();
                                    foreach (byte b in data)
                                    {
                                        if (b == (byte)Flag.NAK)
                                        {
                                            uartsender(sotbuff);
                                            break;
                                        }

                                        if (b == (byte)Flag.ACK)
                                        {
                                            if (debug) info.Add(string.Format("下载完成\r\n"));
                                            step=9;
                                        }
                                    }
                                }
                                break;
                            case 9:
                                System.Threading.Thread.Sleep(100);
                                uartsender(new byte[] { (byte)'2' });
                                if (debug) info.Add(string.Format("结束下载\r\n"));
                                isRun = false;
                                Invoke(new MethodInvoker(() => {
                                    int val = writepos * 100 / databuff.Length;
                                    downloadpross.Value = val > 100 ? 100 : val;
                                    dl_b.Text = isRun ? "停止" : "下载";
                                    downloadinfo.Text = "完成";
                                }));
                                
                                return;
                        }
                        if(debug)
                            while (info.Count != 0)
                            {
                                Invoke(new MethodInvoker(() => {
                                infotextbox.AppendText(info[0]);
                                info.RemoveAt(0);
                                }));
                            }
                        System.Threading.Thread.Sleep(0);
                    }
                }).Start();
#else
                
                new System.Threading.Thread(() => {
                    int step = 0;
                    int errorcount = 0;
                    while (isRun)
                    {
                        if (Error)
                        {
                            isRun = false;
                            Invoke(new MethodInvoker(() => {
                                downloadpross.Value = 0;
                                dl_b.Text = isRun ? "停止" : "下载";
                                downloadinfo.Text = "下载出现错误";
                            }));
                        }
                        switch (step)
                        {
                            case 0:
                                System.Threading.Thread.Sleep(500);
                                setbps(downloadbps);
                                uartsender(new byte[] { (byte)'1' });
                                if(debug)info.Add("发送1 更新固件\r\n");
                                System.Threading.Thread.Sleep(200);
                                recvData.Clear();
                                enableass = false;
                                step++;
                                break;
                            case 1:

                                while (recvData.Count != 0)
                                {
                                    var data = recvData[0]; recvData.RemoveAt(0);
                                    if (debug) info.Add(""+(char)data);
                                    if (data == 'C')
                                    {
                                        if (debug) info.Add("\r\n识别到C\r\n");
                                        step = 2;
                                        break;
                                    }
                                }
                                //if (recvData.Count != 0)
                                //{
                                //    var data = recvData.ToArray();
                                //    recvData.Clear();
                                //    if (debug) info.Add(Encoding.Default.GetString(data));
                                    
                                //    foreach(byte b in data)
                                //    {
                                //        if (b == 'C')
                                //        {
                                //            if (debug) info.Add("\r\n识别到C\r\n");
                                //            step = 2;
                                //            break;
                                //        }
                                //    }
                                //}

                                break;
                            case 2:
                                sotcount = 0;
                                sotbuff[0] = 1;
                                sotbuff[1] = sotcount;
                                sotbuff[2] = (byte)~sotcount;
                                int index = 0;
                                var len = "test.bin";
                                for (int i = 0; i < 128; i++)
                                    sotbuff[i + 3] = 0;
                                foreach (char c in len)
                                {
                                    sotbuff[index + 3] = (byte)c;
                                    index++;
                                }
                                sotbuff[index + 3] = 0;
                                index++;

                                len = "" + databuff.Length;
                                foreach (char c in len)
                                {
                                    sotbuff[index + 3] = (byte)c;
                                    index++;
                                }
                                sotbuff[index + 3] = 0;

                                index=48;
                                sotbuff[index++ + 3] = 0x55;
                                sotbuff[index++ + 3] = 0x00;
                                sotbuff[index++ + 3] = 0x01;
                                sotbuff[index++ + 3] = 0xAA;

                                //newbps = tryParse(bpsselectcomboBox1.Text+"", 115200);
                                //info.Add("\r\n设置下载波特率为"+newbps);
                                //bpsselectcomboBox1.Text = "" + newbps;

                                sotbuff[index++ + 3] = (byte)(newbps & 0xff);
                                sotbuff[index++ + 3] = (byte)((newbps >> 8) & 0xff);
                                sotbuff[index++ + 3] = (byte)((newbps >> 16) & 0xff);
                                sotbuff[index++ + 3] = (byte)((newbps >> 24) & 0xff);

                                var rand = new Random();
                                for (int i = 0; i < 64; i++)
                                    sotbuff[index++ + 3] = hash256[i] = (byte)rand.Next();

                                for (int j = 1; j < 16; j++)
                                    for (int i = 0; i < 64; i++)
                                    {
                                        hash256[j * 64 + i] = (byte)(hash256[i] * 137 + j);
                                    }

                                YModemCrc(sotbuff);
                                
                                uartsender(sotbuff);
                                if (debug) info.Add("\r\n发送文件信息");
                                sotcount++;
                                step++;
                                
                                break;
                            case 3:
                                while (recvData.Count != 0)
                                {
                                    var data = recvData[0]; recvData.RemoveAt(0);
                                    if (debug) info.Add(string.Format("[0x{0:X2}]",data));
                                    switch (data)
                                    {
                                        case (byte)Flag.NAK:
                                            errorcount = 0;
                                            if (debug) info.Add("\r\n重发数据NAK");
                                            uartsender(sotbuff);
                                            step = 3;
                                            break;
                                        case (byte)Flag.ACK:
                                            errorcount = 0;
                                            if (false == enableass)
                                            {
                                                enableass = true;
                                                for (int i = 0; i < 1024; i++)
                                                    hash256[i] = 0;
                                            }
                                            step = 4;
                                            break;                                      
                                        case (byte)'X':
                                            enableass = true;
                                            setbps(newbps);
                                            step = 4;
                                            break;
                                        default:
                                            if (writepos > 0)
                                            {
                                                if (++errorcount >= 4)
                                                {
                                                    isRun = false;
                                                    Invoke(new MethodInvoker(() =>
                                                    {
                                                        downloadpross.Value = 0;
                                                        dl_b.Text = isRun ? "停止" : "下载";
                                                        downloadinfo.Text = "下载出现错误";
                                                    }));
                                                    return;
                                                }
                                            }
                                            break;
                                    }
                                }
                                //if (recvData.Count != 0)
                                //{
                                //    var data = recvData.ToArray();
                                //    recvData.Clear();
                                //    foreach (byte b in data)
                                //        if (debug) info.Add(string.Format("0x{0:X2}", b));
                                //    if (debug) info.Add("\r\n");
                                //    foreach (byte b in data)
                                //    {
                                //        if (b == (byte)Flag.NAK)
                                //        {
                                //            if (debug) info.Add("重发数据NAK\r\n");
                                //            uartsender(sotbuff);
                                //            step = 3;
                                //            break;
                                //        }

                                //        if (b == (byte)Flag.ACK)
                                //        {
                                //            step=4;
                                //        }
                                //    }
                                //}
                                break;
                            case 4:
                                pos = writepos;
                                if (debug) info.Add("数据正确ACK\r\n");
                                if (writepos < databuff.Length)
                                {
                                    int writelen = 128;
                                    byte[] data = sotbuff ;
                                    if(stxmodecheckBox1.Checked)
                                    if ((writepos + 1024) <= databuff.Length)
                                    {
                                        writelen = 1024;
                                        data = stxbuff;
                                        data[0] = (byte)Flag.STX;
                                    }

                                    data[1] = sotcount;
                                    data[2] = (byte)~sotcount;
                                    sotcount++;
                                    for (int i = 0; i < writelen; i++)
                                    {
                                        if ((writepos + i) >= databuff.Length)
                                            data[i + 3] = (byte)(0x1a^hash256[i]);
                                        else
                                            data[i + 3] = (byte)(databuff[writepos + i]^hash256[i]);
                                    }
                                    YModemCrc(data, writelen);
                                    uartsender(data);

                                    if (debug) info.Add(string.Format("发送:第{0}包数据 {1}字节数据\r\n",sotcount-1,writelen));

                                    Invoke(new MethodInvoker(() => {
                                        int val = writepos * 100 / databuff.Length;
                                        downloadpross.Value = val > 100 ? 100 : val;
                                        downloadinfo.Text = string.Format("{0}/{1}", writepos, databuff.Length);
                                    }));

                                    writepos += writelen;
                                    step--;
                                    break;
                                }
                                step++;
                                break;
                            case 5:
                                System.Threading.Thread.Sleep(800);
                                if (debug) info.Add(string.Format("第一次发送EOT\r\n"));
                                recvData.Clear();
                                uartsender(new byte[] {(byte)Flag.EOT });
                                step++;
                                break;
                            case 6:
                                while (recvData.Count != 0)
                                {
                                    var data = recvData[0]; recvData.RemoveAt(0);
                                    if (debug) info.Add(string.Format("[0x{0:X2}]", data));
                                    switch (data)
                                    {
                                        case (byte)Flag.NAK:
                                            if (debug) info.Add(string.Format("重发EOT\r\n"));
                                            uartsender(new byte[] { (byte)Flag.EOT });
                                            step = 6;
                                            break;
                                        case (byte)Flag.ACK:
                                            step = 7;
                                            break;
                                        case (byte)'C':
                                            
                                            break;
                                        case 0xf0:
                                            step = 7;
                                            break;
                                    }
                                }
                                //if (recvData.Count != 0)
                                //{
                                //    var data = recvData.ToArray();
                                //    recvData.Clear();
                                //    if (debug)
                                //    {
                                //        foreach (byte b in data)
                                //            info.Add(string.Format("0x{0:X2}", b));
                                //        info.Add("\r\n");
                                //    }
                                //    foreach (byte b in data)
                                //    {
                                //        if (b == (byte)Flag.NAK)
                                //        {
                                //            if (debug) info.Add(string.Format("重发EOT\r\n"));
                                //            uartsender(new byte[] { (byte)Flag.EOT });
                                //            step = 6;
                                //            break;
                                //        }

                                //        if (b == (byte)Flag.ACK)
                                //        {
                                //            step=7;
                                //        }
                                //    }
                                //}
                                
                                break;
                            case 7:
                                sotcount=0;
                                sotbuff[1] = sotcount;
                                sotbuff[2] = (byte)~sotcount;
                                for (int i = 0; i < 8; i++)
                                {
                                    sotbuff[3 + i] = 0;
                                }
                                YModemCrc(sotbuff);
                                recvData.Clear();
                                uartsender(sotbuff);
                                if (debug) info.Add(string.Format("发送结束后的空包\r\n"));
                                step++;
                                break;
                            case 8:
                                while (recvData.Count != 0)
                                {
                                    var data = recvData[0]; recvData.RemoveAt(0);
                                    if (debug) info.Add(string.Format("{0}",(char)data));
                                    switch (data)
                                    {
                                        case (byte)Flag.NAK:
                                            if (debug) info.Add(string.Format("重发空包\r\n"));
                                            uartsender(sotbuff);
                                            step = 6;
                                            break;
                                        case (byte)Flag.ACK:
                                            if (debug) info.Add(string.Format("下载完成\r\n"));
                                            step = 9;
                                            break;
                                        case (byte)'C':

                                            break;
                                        case (byte)'S':
                                            if (debug) info.Add(string.Format("下载完成\r\n"));
                                            step = 9;
                                            break;
                                    }
                                }
                                //if (recvData.Count != 0)
                                //{
                                //    var data = recvData.ToArray();
                                //    recvData.Clear();
                                //    foreach (byte b in data)
                                //    {
                                //        if (b == (byte)Flag.NAK)
                                //        {
                                //            uartsender(sotbuff);
                                //            break;
                                //        }

                                //        if (b == (byte)Flag.ACK)
                                //        {
                                //            if (debug) info.Add(string.Format("下载完成\r\n"));
                                //            step=9;
                                //        }
                                //    }
                                //}
                                break;
                            case 9:
                                System.Threading.Thread.Sleep(100);
                                uartsender(new byte[] { (byte)'2' });
                                if (debug) info.Add(string.Format("结束下载\r\n"));
                                isRun = false;
                                Invoke(new MethodInvoker(() => {
                                    int val = writepos * 100 / databuff.Length;
                                    downloadpross.Value = val > 100 ? 100 : val;
                                    dl_b.Text = isRun ? "停止" : "下载";
                                    downloadinfo.Text = "完成";
                                }));
                                
                                return;
                        }
                        if(debug)
                            while (info.Count != 0)
                            {
                                Invoke(new MethodInvoker(() => {
                                infotextbox.AppendText(info[0]);
                                info.RemoveAt(0);
                                }));
                            }
                        System.Threading.Thread.Sleep(0);
                    }
                }).Start();
#endif
            }
            else
            {
                isRun = false;
            }

            
            dl_b.Text = isRun ? "停止" : "下载";
        }

        protected override void OnClosing(CancelEventArgs e)
        {
            dl_b.Text = isRun ? "停止" : "下载";
            base.OnClosing(e);
        }

        private void close_b_Click(object sender, EventArgs e)
        {
            isRun = false;
        }

        private void loadweb_Click(object sender, EventArgs e)
        {
            //string urldata = "https://gitee.com/KeyMove/wontec_claw/raw/master/wontec_claw/bin/Release/";
            try
            {
                var info = HttpGetPage(urldata + "last.cfg").Replace("\r", "").Split('\n');
                var data = HttpGetPageData(urldata + info[0]);
                //byte[] key = System.Text.Encoding.UTF8.GetBytes(info[1]);
                var dpdata = de.Invoke(null, new object[] { data, System.Text.Encoding.UTF8.GetBytes(info[1]) }) as byte[];
                databuff = dp.Invoke(null, new object[] { dpdata }) as byte[];
                if (databuff[7] == databuff[0xb] && databuff[0xb] == databuff[0xf] && databuff[0x13] == databuff[0xf])
                {
                    path_t.Text = "File:[" + info[0] + "] Size:[" + databuff.Length + "]";
                }
                else
                {
                    MessageBox.Show("文件错误!");
                }
            }
            catch (Exception ex) { MessageBox.Show("获取文件失败","下载固件",MessageBoxButtons.OK,MessageBoxIcon.Error); }
            return;
        }

        private void moreinfo_check_CheckedChanged(object sender, EventArgs e)
        {
            if (moreinfo_check.Checked)
            {
                Size = new Size(Size.Width, 421);
                bainfolabel2.Visible=befortextBox1.Visible=aftertextBox2.Visible= infotextbox.Visible = true;
            }
            else
            {
                Size = new Size(Size.Width, 185);
                bainfolabel2.Visible = befortextBox1.Visible = aftertextBox2.Visible = infotextbox.Visible = false;
            }
            debug = moreinfo_check.Checked;
        }

        private static Icon newIcon = new Icon(new MemoryStream(new byte[] {0x00,0x00,0x01,0x00,0x01,0x00,0x20,0x27,0x00,0x00,0x01,0x00,0x20,0x00,0x32,0x03,
0x00,0x00,0x16,0x00,0x00,0x00,0x89,0x50,0x4E,0x47,0x0D,0x0A,0x1A,0x0A,0x00,0x00,
0x00,0x0D,0x49,0x48,0x44,0x52,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x27,0x08,0x03,
0x00,0x00,0x00,0x59,0xA1,0xBA,0x7E,0x00,0x00,0x00,0x01,0x73,0x52,0x47,0x42,0x01,
0xD9,0xC9,0x2C,0x7F,0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,0x00,0x0B,0x13,
0x00,0x00,0x0B,0x13,0x01,0x00,0x9A,0x9C,0x18,0x00,0x00,0x01,0x08,0x50,0x4C,0x54,
0x45,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0xC6,0xBF,0x09,0x00,0x00,0x00,
0x58,0x74,0x52,0x4E,0x53,0x00,0x04,0x39,0x8B,0xA6,0xAA,0x75,0x08,0x28,0xBB,0xFA,
0xFF,0xA7,0x16,0x20,0xCD,0xA0,0xBC,0x10,0xE4,0x7D,0x32,0x2B,0x4E,0xB1,0x0C,0x25,
0xB2,0x0F,0x80,0xF9,0xFC,0xB4,0x8E,0x92,0x2A,0xFE,0xB8,0xC2,0x17,0x23,0xEF,0xB3,
0x06,0xFB,0x27,0x24,0xD0,0x1A,0x82,0xD5,0x11,0x65,0x89,0x0A,0x9B,0xC7,0x5E,0x9A,
0x77,0x67,0x76,0xF5,0x5F,0xD8,0x87,0x18,0xDA,0xD9,0xC9,0xDE,0xD7,0xC3,0x94,0x86,
0x1F,0xF4,0xD6,0xD3,0xDB,0x8C,0x74,0x88,0x6B,0xD4,0x6A,0x07,0x29,0x8B,0x9C,0x94,
0x73,0x00,0x00,0x01,0x5F,0x49,0x44,0x41,0x54,0x78,0x9C,0xB5,0x94,0xDB,0x56,0x82,
0x40,0x14,0x86,0xC7,0x52,0xC9,0xB6,0x59,0x51,0x52,0x8E,0xC7,0x92,0xC2,0xB2,0xB2,
0x3C,0xA5,0x65,0xA8,0x95,0x67,0x53,0x2B,0xD3,0xF7,0x7F,0x93,0x36,0x20,0x3A,0x31,
0x03,0x77,0xFD,0x17,0x2C,0x66,0xFD,0x1F,0x9B,0x7D,0x5A,0x43,0x08,0x21,0xBE,0xAD,
0x6D,0x7F,0x80,0x55,0x50,0x22,0xAC,0x76,0x42,0xBB,0xE0,0x50,0x78,0x8F,0xF1,0x23,
0xFB,0x4E,0x1B,0xE5,0x67,0x62,0x1C,0x08,0x7C,0x80,0xC3,0x35,0x21,0x1F,0xE1,0xF1,
0x38,0xAA,0xAC,0x75,0x62,0x11,0xA7,0xB1,0x15,0x40,0x31,0x81,0x38,0x9B,0x92,0x62,
0xFF,0x25,0xB1,0x39,0x27,0x9D,0x40,0x2A,0x8D,0x8F,0x4C,0xCC,0x1D,0x88,0x9F,0x19,
0x31,0x42,0x31,0x57,0x20,0x20,0x9D,0x1B,0x44,0x26,0x21,0x02,0xB2,0x2A,0xC0,0x85,
0x12,0xBD,0x34,0xF3,0xD0,0x04,0x40,0xEE,0x8A,0xA9,0xF6,0xDA,0xC7,0x03,0x79,0xB6,
0x31,0x37,0xB7,0x3C,0x40,0xEE,0x0A,0x0C,0xA1,0x08,0x00,0x72,0xFF,0x10,0x36,0x67,
0x56,0x74,0x03,0x6C,0x25,0x05,0x40,0xA9,0x5C,0x2E,0x79,0x02,0x15,0x80,0x8A,0x27,
0x80,0xF9,0x15,0x3C,0x01,0xCC,0xAB,0xF8,0x6F,0x40,0xF5,0xB1,0x56,0xB7,0x81,0x7A,
0xED,0xA9,0xCA,0x01,0xCF,0xB8,0x05,0x0D,0x0B,0x68,0xA4,0x00,0x5E,0x38,0x00,0x0B,
0x04,0xBD,0xD9,0x02,0x68,0x35,0x75,0x7C,0x6D,0x73,0xC0,0xEB,0xDB,0x6A,0x93,0xD2,
0xF8,0x3D,0xBC,0x6B,0x7C,0x92,0xB4,0xB3,0x19,0x51,0x87,0x8A,0xAA,0xA0,0xEB,0x29,
0x16,0xA8,0xB8,0x4C,0xDA,0xB5,0xFC,0x2E,0x75,0xEB,0x83,0xD6,0x33,0xFC,0x9E,0xE6,
0xDE,0x28,0xDA,0x07,0xE8,0x53,0xAF,0x4E,0xE6,0x06,0x83,0x9C,0x67,0xAB,0xFF,0xC8,
0x02,0x8C,0x2D,0x1F,0x8A,0x81,0x21,0x80,0x9A,0x25,0xA3,0x31,0x76,0x57,0x16,0xF9,
0xF2,0x07,0xC0,0x78,0x44,0xF2,0x13,0x0C,0x34,0x9D,0x25,0x39,0xCD,0xA6,0x68,0x4C,
0xF2,0x84,0x04,0xC1,0x43,0x9F,0x18,0x49,0xAA,0xB8,0xFB,0x5F,0xE6,0x35,0x22,0x7D,
0xCF,0x75,0x95,0x37,0x55,0x7D,0xFE,0x63,0x5F,0x33,0x8B,0xC8,0x52,0xE1,0xB4,0x8C,
0x2C,0x0C,0xEF,0x17,0xDA,0xB7,0x3D,0xD5,0xA4,0xB0,0x98,0xE8,0x00,0x00,0x00,0x00,
0x49,0x45,0x4E,0x44,0xAE,0x42,0x60,0x82,}));

        private void path_t_SelectedIndexChanged(object sender, EventArgs e)
        {
            MessageBox.Show("手动选择固件选错版本将导致无法恢复", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            urldata = fwurl[path_t.SelectedText];
            new System.Threading.Thread(() => {
                System.Threading.Thread.Sleep(1);
            Invoke(new MethodInvoker(() => { 
            loadweb_Click(null, null);
            }));
            }).Start();
        }

        static byte[] assdata = new byte[]{
0x4D,0x5A,0x90,0x00,0x03,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,
0xB8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0x0E,0x1F,0xBA,0x0E,0x00,0xB4,0x09,0xCD,0x21,0xB8,0x01,0x4C,0xCD,0x21,0x54,0x68,
0x69,0x73,0x20,0x70,0x72,0x6F,0x67,0x72,0x61,0x6D,0x20,0x63,0x61,0x6E,0x6E,0x6F,
0x74,0x20,0x62,0x65,0x20,0x72,0x75,0x6E,0x20,0x69,0x6E,0x20,0x44,0x4F,0x53,0x20,
0x6D,0x6F,0x64,0x65,0x2E,0x0D,0x0D,0x0A,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x50,0x45,0x00,0x00,0x4C,0x01,0x03,0x00,0xDA,0xB8,0x09,0x61,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xE0,0x00,0x02,0x21,0x0B,0x01,0x0B,0x00,0x00,0x0C,0x00,0x00,
0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xEE,0x2B,0x00,0x00,0x00,0x20,0x00,0x00,
0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x20,0x00,0x00,0x00,0x02,0x00,0x00,
0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x80,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x40,0x85,
0x00,0x00,0x10,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x10,0x00,0x00,
0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x9C,0x2B,0x00,0x00,0x4F,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0xB0,0x02,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x60,0x00,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x08,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x20,0x00,0x00,0x48,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2E,0x74,0x65,0x78,0x74,0x00,0x00,0x00,
0xF4,0x0B,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x02,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x60,
0x2E,0x72,0x73,0x72,0x63,0x00,0x00,0x00,0xB0,0x02,0x00,0x00,0x00,0x40,0x00,0x00,
0x00,0x04,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x40,0x2E,0x72,0x65,0x6C,0x6F,0x63,0x00,0x00,
0x0C,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x12,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x42,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xD0,0x2B,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x02,0x00,0x05,0x00,
0x98,0x23,0x00,0x00,0x04,0x08,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x1B,0x30,0x04,0x00,0x53,0x00,0x00,0x00,0x01,0x00,0x00,0x11,0x00,0x73,0x03,0x00,
0x00,0x0A,0x0A,0x00,0x06,0x17,0x73,0x04,0x00,0x00,0x0A,0x0B,0x00,0x07,0x02,0x16,
0x02,0x8E,0x69,0x6F,0x05,0x00,0x00,0x0A,0x00,0x00,0xDE,0x12,0x07,0x14,0xFE,0x01,
0x13,0x04,0x11,0x04,0x2D,0x07,0x07,0x6F,0x06,0x00,0x00,0x0A,0x00,0xDC,0x00,0x06,
0x6F,0x07,0x00,0x00,0x0A,0x0C,0x08,0x0D,0xDE,0x12,0x06,0x14,0xFE,0x01,0x13,0x04,
0x11,0x04,0x2D,0x07,0x06,0x6F,0x06,0x00,0x00,0x0A,0x00,0xDC,0x00,0x09,0x2A,0x00,
0x01,0x1C,0x00,0x00,0x02,0x00,0x10,0x00,0x10,0x20,0x00,0x12,0x00,0x00,0x00,0x00,
0x02,0x00,0x07,0x00,0x37,0x3E,0x00,0x12,0x00,0x00,0x00,0x00,0x1B,0x30,0x04,0x00,
0x99,0x00,0x00,0x00,0x02,0x00,0x00,0x11,0x00,0x73,0x03,0x00,0x00,0x0A,0x0A,0x00,
0x02,0x73,0x08,0x00,0x00,0x0A,0x0B,0x00,0x07,0x16,0x73,0x04,0x00,0x00,0x0A,0x0C,
0x00,0x20,0x00,0x04,0x00,0x00,0x8D,0x09,0x00,0x00,0x01,0x0D,0x16,0x13,0x04,0x2B,
0x0D,0x00,0x06,0x09,0x16,0x11,0x04,0x6F,0x05,0x00,0x00,0x0A,0x00,0x00,0x08,0x09,
0x16,0x09,0x8E,0x69,0x6F,0x09,0x00,0x00,0x0A,0x25,0x13,0x04,0x16,0xFE,0x02,0x13,
0x06,0x11,0x06,0x2D,0xDC,0x00,0xDE,0x12,0x08,0x14,0xFE,0x01,0x13,0x06,0x11,0x06,
0x2D,0x07,0x08,0x6F,0x06,0x00,0x00,0x0A,0x00,0xDC,0x00,0x00,0xDE,0x12,0x07,0x14,
0xFE,0x01,0x13,0x06,0x11,0x06,0x2D,0x07,0x07,0x6F,0x06,0x00,0x00,0x0A,0x00,0xDC,
0x00,0x06,0x6F,0x07,0x00,0x00,0x0A,0x13,0x05,0xDE,0x12,0x06,0x14,0xFE,0x01,0x13,
0x06,0x11,0x06,0x2D,0x07,0x06,0x6F,0x06,0x00,0x00,0x0A,0x00,0xDC,0x00,0x11,0x05,
0x2A,0x00,0x00,0x00,0x01,0x28,0x00,0x00,0x02,0x00,0x18,0x00,0x38,0x50,0x00,0x12,
0x00,0x00,0x00,0x00,0x02,0x00,0x0F,0x00,0x57,0x66,0x00,0x12,0x00,0x00,0x00,0x00,
0x02,0x00,0x07,0x00,0x7C,0x83,0x00,0x12,0x00,0x00,0x00,0x00,0x13,0x30,0x04,0x00,
0x56,0x00,0x00,0x00,0x03,0x00,0x00,0x11,0x00,0x03,0x0A,0x02,0x0B,0x73,0x0A,0x00,
0x00,0x0A,0x0C,0x08,0x06,0x6F,0x0B,0x00,0x00,0x0A,0x00,0x08,0x18,0x6F,0x0C,0x00,
0x00,0x0A,0x00,0x08,0x18,0x6F,0x0D,0x00,0x00,0x0A,0x00,0x08,0x28,0x0E,0x00,0x00,
0x0A,0x72,0x01,0x00,0x00,0x70,0x6F,0x0F,0x00,0x00,0x0A,0x6F,0x10,0x00,0x00,0x0A,
0x00,0x08,0x6F,0x11,0x00,0x00,0x0A,0x0D,0x09,0x07,0x16,0x07,0x8E,0x69,0x6F,0x12,
0x00,0x00,0x0A,0x13,0x04,0x11,0x04,0x13,0x05,0x2B,0x00,0x11,0x05,0x2A,0x00,0x00,
0x13,0x30,0x04,0x00,0x56,0x00,0x00,0x00,0x03,0x00,0x00,0x11,0x00,0x03,0x0A,0x02,
0x0B,0x73,0x0A,0x00,0x00,0x0A,0x0C,0x08,0x06,0x6F,0x0B,0x00,0x00,0x0A,0x00,0x08,
0x18,0x6F,0x0C,0x00,0x00,0x0A,0x00,0x08,0x18,0x6F,0x0D,0x00,0x00,0x0A,0x00,0x08,
0x28,0x0E,0x00,0x00,0x0A,0x72,0x01,0x00,0x00,0x70,0x6F,0x0F,0x00,0x00,0x0A,0x6F,
0x10,0x00,0x00,0x0A,0x00,0x08,0x6F,0x13,0x00,0x00,0x0A,0x0D,0x09,0x07,0x16,0x07,
0x8E,0x69,0x6F,0x12,0x00,0x00,0x0A,0x13,0x04,0x11,0x04,0x13,0x05,0x2B,0x00,0x11,
0x05,0x2A,0x1E,0x02,0x28,0x14,0x00,0x00,0x0A,0x2A,0x00,0x00,0x13,0x30,0x04,0x00,
0x18,0x01,0x00,0x00,0x04,0x00,0x00,0x11,0x00,0x28,0x15,0x00,0x00,0x0A,0x72,0x23,
0x00,0x00,0x70,0x28,0x16,0x00,0x00,0x0A,0x0A,0x06,0x19,0x73,0x17,0x00,0x00,0x0A,
0x0B,0x06,0x72,0x37,0x00,0x00,0x70,0x28,0x16,0x00,0x00,0x0A,0x1A,0x73,0x17,0x00,
0x00,0x0A,0x0C,0x07,0x6F,0x18,0x00,0x00,0x0A,0xD4,0x8D,0x09,0x00,0x00,0x01,0x0D,
0x07,0x09,0x16,0x09,0x8E,0x69,0x6F,0x09,0x00,0x00,0x0A,0x26,0x07,0x6F,0x19,0x00,
0x00,0x0A,0x00,0x09,0x28,0x01,0x00,0x00,0x06,0x13,0x04,0x28,0x0E,0x00,0x00,0x0A,
0x72,0x3F,0x00,0x00,0x70,0x6F,0x0F,0x00,0x00,0x0A,0x13,0x05,0x11,0x04,0x11,0x05,
0x28,0x03,0x00,0x00,0x06,0x13,0x06,0x08,0x11,0x06,0x16,0x11,0x06,0x8E,0x69,0x6F,
0x05,0x00,0x00,0x0A,0x00,0x08,0x6F,0x1A,0x00,0x00,0x0A,0x00,0x08,0x6F,0x19,0x00,
0x00,0x0A,0x00,0x11,0x06,0x11,0x05,0x28,0x04,0x00,0x00,0x06,0x13,0x07,0x11,0x07,
0x28,0x02,0x00,0x00,0x06,0x13,0x08,0x72,0x61,0x00,0x00,0x70,0x09,0x8E,0x69,0x8C,
0x14,0x00,0x00,0x01,0x11,0x08,0x8E,0x69,0x8C,0x14,0x00,0x00,0x01,0x28,0x1B,0x00,
0x00,0x0A,0x28,0x1C,0x00,0x00,0x0A,0x00,0x16,0x13,0x09,0x2B,0x33,0x00,0x09,0x11,
0x09,0x91,0x11,0x08,0x11,0x09,0x91,0xFE,0x01,0x13,0x0A,0x11,0x0A,0x2D,0x1A,0x00,
0x72,0x81,0x00,0x00,0x70,0x11,0x09,0x8C,0x14,0x00,0x00,0x01,0x28,0x1D,0x00,0x00,
0x0A,0x28,0x1C,0x00,0x00,0x0A,0x00,0x2B,0x14,0x00,0x11,0x09,0x17,0x58,0x13,0x09,
0x11,0x09,0x09,0x8E,0x69,0xFE,0x04,0x13,0x0A,0x11,0x0A,0x2D,0xC0,0x72,0x91,0x00,
0x00,0x70,0x28,0x1C,0x00,0x00,0x0A,0x00,0x16,0x28,0x1E,0x00,0x00,0x0A,0x00,0x2A,
0x1E,0x02,0x28,0x14,0x00,0x00,0x0A,0x2A,0x42,0x53,0x4A,0x42,0x01,0x00,0x01,0x00,
0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x76,0x34,0x2E,0x30,0x2E,0x33,0x30,0x33,
0x31,0x39,0x00,0x00,0x00,0x00,0x05,0x00,0x6C,0x00,0x00,0x00,0xB0,0x02,0x00,0x00,
0x23,0x7E,0x00,0x00,0x1C,0x03,0x00,0x00,0xF8,0x02,0x00,0x00,0x23,0x53,0x74,0x72,
0x69,0x6E,0x67,0x73,0x00,0x00,0x00,0x00,0x14,0x06,0x00,0x00,0x98,0x00,0x00,0x00,
0x23,0x55,0x53,0x00,0xAC,0x06,0x00,0x00,0x10,0x00,0x00,0x00,0x23,0x47,0x55,0x49,
0x44,0x00,0x00,0x00,0xBC,0x06,0x00,0x00,0x48,0x01,0x00,0x00,0x23,0x42,0x6C,0x6F,
0x62,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x01,0x57,0x1D,0x02,0x00,
0x09,0x00,0x00,0x00,0x00,0xFA,0x25,0x33,0x00,0x16,0x00,0x00,0x01,0x00,0x00,0x00,
0x15,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x07,0x00,0x00,0x00,
0x06,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x0A,0x00,
0x01,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x43,0x00,0x3C,0x00,0x06,0x00,0xC5,0x00,
0xA5,0x00,0x06,0x00,0xE5,0x00,0xA5,0x00,0x06,0x00,0x18,0x01,0x0E,0x01,0x0A,0x00,
0x3B,0x01,0x25,0x01,0x06,0x00,0x46,0x01,0x0E,0x01,0x0A,0x00,0x4D,0x01,0x25,0x01,
0x06,0x00,0x63,0x01,0x3C,0x00,0x06,0x00,0x7F,0x01,0x3C,0x00,0x06,0x00,0xA6,0x01,
0x89,0x01,0x06,0x00,0xB6,0x01,0x89,0x01,0x06,0x00,0xD1,0x01,0x89,0x01,0x06,0x00,
0xE5,0x01,0x89,0x01,0x06,0x00,0x09,0x02,0xFD,0x01,0x06,0x00,0x2B,0x02,0x89,0x01,
0x06,0x00,0x70,0x02,0x0E,0x01,0x06,0x00,0x8E,0x02,0x3C,0x00,0x06,0x00,0x9C,0x02,
0x0E,0x01,0x06,0x00,0xA7,0x02,0x0E,0x01,0x06,0x00,0xC7,0x02,0x3C,0x00,0x06,0x00,
0xD4,0x02,0x3C,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
0x01,0x00,0x81,0x01,0x10,0x00,0x19,0x00,0x00,0x00,0x05,0x00,0x01,0x00,0x01,0x00,
0x01,0x00,0x10,0x00,0x21,0x00,0x00,0x00,0x05,0x00,0x01,0x00,0x03,0x00,0x00,0x01,
0x10,0x00,0x2B,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x06,0x00,0x51,0x80,0x68,0x00,
0x11,0x00,0x51,0x80,0x72,0x00,0x11,0x00,0x50,0x20,0x00,0x00,0x00,0x00,0x96,0x00,
0x4A,0x00,0x0A,0x00,0x01,0x00,0xCC,0x20,0x00,0x00,0x00,0x00,0x96,0x00,0x58,0x00,
0x0A,0x00,0x02,0x00,0x9C,0x21,0x00,0x00,0x00,0x00,0x96,0x00,0x75,0x00,0x56,0x00,
0x03,0x00,0x00,0x22,0x00,0x00,0x00,0x00,0x96,0x00,0x7D,0x00,0x56,0x00,0x05,0x00,
0x62,0x22,0x00,0x00,0x00,0x00,0x86,0x18,0x85,0x00,0x5F,0x00,0x07,0x00,0x6C,0x22,
0x00,0x00,0x00,0x00,0x91,0x00,0x8B,0x00,0x63,0x00,0x07,0x00,0x90,0x23,0x00,0x00,
0x00,0x00,0x86,0x18,0x85,0x00,0x5F,0x00,0x07,0x00,0x00,0x00,0x01,0x00,0x90,0x00,
0x00,0x00,0x01,0x00,0x96,0x00,0x00,0x00,0x01,0x00,0x9D,0x00,0x00,0x00,0x02,0x00,
0xA1,0x00,0x00,0x00,0x01,0x00,0x9D,0x00,0x00,0x00,0x02,0x00,0xA1,0x00,0x11,0x00,
0x85,0x00,0x67,0x00,0x19,0x00,0x85,0x00,0x5F,0x00,0x21,0x00,0x85,0x00,0x5F,0x00,
0x29,0x00,0x85,0x00,0x6C,0x00,0x31,0x00,0x5D,0x01,0x74,0x00,0x41,0x00,0x6F,0x01,
0x5F,0x00,0x21,0x00,0x77,0x01,0x7C,0x00,0x21,0x00,0x85,0x00,0x8D,0x00,0x31,0x00,
0x84,0x01,0x93,0x00,0x51,0x00,0x85,0x00,0x5F,0x00,0x59,0x00,0xC9,0x01,0x8D,0x00,
0x59,0x00,0xDC,0x01,0xAA,0x00,0x59,0x00,0xF1,0x01,0xB0,0x00,0x71,0x00,0x12,0x02,
0xB6,0x00,0x71,0x00,0x1B,0x02,0xBB,0x00,0x59,0x00,0x24,0x02,0x8D,0x00,0x59,0x00,
0x3C,0x02,0xC1,0x00,0x79,0x00,0x4C,0x02,0xC6,0x00,0x59,0x00,0x60,0x02,0xC1,0x00,
0x09,0x00,0x85,0x00,0x5F,0x00,0x81,0x00,0x7A,0x02,0xDE,0x00,0x89,0x00,0x95,0x02,
0xE2,0x00,0x91,0x00,0x85,0x00,0xE8,0x00,0x31,0x00,0xB0,0x02,0xEF,0x00,0x31,0x00,
0xBB,0x02,0x5F,0x00,0x31,0x00,0xC1,0x02,0x5F,0x00,0x89,0x00,0xCD,0x02,0xF3,0x00,
0xA9,0x00,0xDC,0x02,0xFA,0x00,0x89,0x00,0x95,0x02,0xFF,0x00,0xA9,0x00,0xE6,0x02,
0x05,0x01,0x0E,0x00,0x04,0x00,0x14,0x00,0x0E,0x00,0x08,0x00,0x35,0x00,0x2E,0x00,
0x0B,0x00,0x20,0x01,0x2E,0x00,0x13,0x00,0x29,0x01,0x81,0x00,0x9B,0x00,0xCF,0x00,
0x0A,0x01,0x04,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x03,0x01,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0x00,0x33,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x3C,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x3C,0x4D,0x6F,0x64,0x75,0x6C,0x65,0x3E,0x00,0x74,0x65,
0x73,0x74,0x65,0x6E,0x63,0x6F,0x64,0x65,0x2E,0x64,0x6C,0x6C,0x00,0x5A,0x69,0x70,
0x55,0x74,0x69,0x6C,0x00,0x41,0x45,0x53,0x48,0x65,0x6C,0x70,0x65,0x72,0x00,0x70,
0x72,0x6F,0x67,0x72,0x61,0x6D,0x00,0x6D,0x73,0x63,0x6F,0x72,0x6C,0x69,0x62,0x00,
0x53,0x79,0x73,0x74,0x65,0x6D,0x00,0x4F,0x62,0x6A,0x65,0x63,0x74,0x00,0x43,0x6F,
0x6D,0x70,0x72,0x65,0x73,0x73,0x42,0x79,0x74,0x65,0x73,0x00,0x44,0x65,0x63,0x6F,
0x6D,0x70,0x72,0x65,0x73,0x73,0x42,0x79,0x74,0x65,0x73,0x00,0x50,0x75,0x62,0x6C,
0x69,0x63,0x4B,0x65,0x79,0x00,0x49,0x76,0x00,0x45,0x6E,0x63,0x72,0x79,0x70,0x74,
0x00,0x44,0x65,0x63,0x72,0x79,0x70,0x74,0x00,0x2E,0x63,0x74,0x6F,0x72,0x00,0x4D,
0x61,0x69,0x6E,0x00,0x62,0x79,0x74,0x65,0x73,0x00,0x63,0x62,0x79,0x74,0x65,0x73,
0x00,0x73,0x74,0x72,0x00,0x6B,0x65,0x79,0x00,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,
0x52,0x75,0x6E,0x74,0x69,0x6D,0x65,0x2E,0x43,0x6F,0x6D,0x70,0x69,0x6C,0x65,0x72,
0x53,0x65,0x72,0x76,0x69,0x63,0x65,0x73,0x00,0x43,0x6F,0x6D,0x70,0x69,0x6C,0x61,
0x74,0x69,0x6F,0x6E,0x52,0x65,0x6C,0x61,0x78,0x61,0x74,0x69,0x6F,0x6E,0x73,0x41,
0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x00,0x52,0x75,0x6E,0x74,0x69,0x6D,0x65,
0x43,0x6F,0x6D,0x70,0x61,0x74,0x69,0x62,0x69,0x6C,0x69,0x74,0x79,0x41,0x74,0x74,
0x72,0x69,0x62,0x75,0x74,0x65,0x00,0x74,0x65,0x73,0x74,0x65,0x6E,0x63,0x6F,0x64,
0x65,0x00,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x49,0x4F,0x00,0x4D,0x65,0x6D,0x6F,
0x72,0x79,0x53,0x74,0x72,0x65,0x61,0x6D,0x00,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,
0x49,0x4F,0x2E,0x43,0x6F,0x6D,0x70,0x72,0x65,0x73,0x73,0x69,0x6F,0x6E,0x00,0x47,
0x5A,0x69,0x70,0x53,0x74,0x72,0x65,0x61,0x6D,0x00,0x53,0x74,0x72,0x65,0x61,0x6D,
0x00,0x43,0x6F,0x6D,0x70,0x72,0x65,0x73,0x73,0x69,0x6F,0x6E,0x4D,0x6F,0x64,0x65,
0x00,0x57,0x72,0x69,0x74,0x65,0x00,0x49,0x44,0x69,0x73,0x70,0x6F,0x73,0x61,0x62,
0x6C,0x65,0x00,0x44,0x69,0x73,0x70,0x6F,0x73,0x65,0x00,0x54,0x6F,0x41,0x72,0x72,
0x61,0x79,0x00,0x42,0x79,0x74,0x65,0x00,0x52,0x65,0x61,0x64,0x00,0x53,0x79,0x73,
0x74,0x65,0x6D,0x2E,0x53,0x65,0x63,0x75,0x72,0x69,0x74,0x79,0x2E,0x43,0x72,0x79,
0x70,0x74,0x6F,0x67,0x72,0x61,0x70,0x68,0x79,0x00,0x52,0x69,0x6A,0x6E,0x64,0x61,
0x65,0x6C,0x4D,0x61,0x6E,0x61,0x67,0x65,0x64,0x00,0x53,0x79,0x6D,0x6D,0x65,0x74,
0x72,0x69,0x63,0x41,0x6C,0x67,0x6F,0x72,0x69,0x74,0x68,0x6D,0x00,0x73,0x65,0x74,
0x5F,0x4B,0x65,0x79,0x00,0x43,0x69,0x70,0x68,0x65,0x72,0x4D,0x6F,0x64,0x65,0x00,
0x73,0x65,0x74,0x5F,0x4D,0x6F,0x64,0x65,0x00,0x50,0x61,0x64,0x64,0x69,0x6E,0x67,
0x4D,0x6F,0x64,0x65,0x00,0x73,0x65,0x74,0x5F,0x50,0x61,0x64,0x64,0x69,0x6E,0x67,
0x00,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x54,0x65,0x78,0x74,0x00,0x45,0x6E,0x63,
0x6F,0x64,0x69,0x6E,0x67,0x00,0x67,0x65,0x74,0x5F,0x55,0x54,0x46,0x38,0x00,0x47,
0x65,0x74,0x42,0x79,0x74,0x65,0x73,0x00,0x73,0x65,0x74,0x5F,0x49,0x56,0x00,0x49,
0x43,0x72,0x79,0x70,0x74,0x6F,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x00,
0x43,0x72,0x65,0x61,0x74,0x65,0x45,0x6E,0x63,0x72,0x79,0x70,0x74,0x6F,0x72,0x00,
0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x46,0x69,0x6E,0x61,0x6C,0x42,0x6C,
0x6F,0x63,0x6B,0x00,0x43,0x72,0x65,0x61,0x74,0x65,0x44,0x65,0x63,0x72,0x79,0x70,
0x74,0x6F,0x72,0x00,0x44,0x69,0x72,0x65,0x63,0x74,0x6F,0x72,0x79,0x00,0x47,0x65,
0x74,0x43,0x75,0x72,0x72,0x65,0x6E,0x74,0x44,0x69,0x72,0x65,0x63,0x74,0x6F,0x72,
0x79,0x00,0x53,0x74,0x72,0x69,0x6E,0x67,0x00,0x43,0x6F,0x6E,0x63,0x61,0x74,0x00,
0x46,0x69,0x6C,0x65,0x53,0x74,0x72,0x65,0x61,0x6D,0x00,0x46,0x69,0x6C,0x65,0x4D,
0x6F,0x64,0x65,0x00,0x67,0x65,0x74,0x5F,0x4C,0x65,0x6E,0x67,0x74,0x68,0x00,0x43,
0x6C,0x6F,0x73,0x65,0x00,0x46,0x6C,0x75,0x73,0x68,0x00,0x49,0x6E,0x74,0x33,0x32,
0x00,0x46,0x6F,0x72,0x6D,0x61,0x74,0x00,0x43,0x6F,0x6E,0x73,0x6F,0x6C,0x65,0x00,
0x57,0x72,0x69,0x74,0x65,0x4C,0x69,0x6E,0x65,0x00,0x73,0x65,0x74,0x5F,0x43,0x75,
0x72,0x73,0x6F,0x72,0x56,0x69,0x73,0x69,0x62,0x6C,0x65,0x00,0x00,0x21,0x30,0x00,
0x65,0x00,0x45,0x00,0x6D,0x00,0x38,0x00,0x5A,0x00,0x64,0x00,0x35,0x00,0x4B,0x00,
0x26,0x00,0x42,0x00,0x61,0x00,0x43,0x00,0x31,0x00,0x41,0x00,0x4F,0x00,0x00,0x13,
0x5C,0x00,0x6C,0x00,0x61,0x00,0x73,0x00,0x74,0x00,0x2E,0x00,0x62,0x00,0x69,0x00,
0x6E,0x00,0x00,0x07,0x5F,0x00,0x63,0x00,0x70,0x00,0x00,0x21,0x31,0x00,0x32,0x00,
0x33,0x00,0x34,0x00,0x35,0x00,0x36,0x00,0x37,0x00,0x38,0x00,0x39,0x00,0x30,0x00,
0x31,0x00,0x32,0x00,0x33,0x00,0x34,0x00,0x35,0x00,0x36,0x00,0x00,0x1F,0x73,0x00,
0x69,0x00,0x7A,0x00,0x65,0x00,0x3A,0x00,0x20,0x00,0x7B,0x00,0x30,0x00,0x7D,0x00,
0x20,0x00,0x7C,0x00,0x20,0x00,0x7B,0x00,0x31,0x00,0x7D,0x00,0x00,0x0F,0x65,0x00,
0x72,0x00,0x72,0x00,0x6F,0x00,0x72,0x00,0x20,0x00,0x3A,0x00,0x00,0x05,0x4F,0x00,
0x4B,0x00,0x00,0x00,0x93,0x60,0x1F,0x15,0x83,0x26,0x17,0x4D,0x8D,0x5B,0x57,0x83,
0x04,0xFB,0x37,0xC3,0x00,0x08,0xB7,0x7A,0x5C,0x56,0x19,0x34,0xE0,0x89,0x06,0x00,
0x01,0x1D,0x05,0x1D,0x05,0x02,0x06,0x0E,0x20,0x6C,0x00,0x48,0x00,0x49,0x00,0x61,
0x00,0x26,0x00,0x53,0x00,0x64,0x00,0x44,0x00,0x77,0x00,0x6E,0x00,0x59,0x00,0x74,
0x00,0x49,0x00,0x54,0x00,0x31,0x00,0x46,0x00,0x20,0x30,0x00,0x65,0x00,0x45,0x00,
0x6D,0x00,0x38,0x00,0x5A,0x00,0x64,0x00,0x35,0x00,0x4B,0x00,0x26,0x00,0x42,0x00,
0x61,0x00,0x43,0x00,0x31,0x00,0x41,0x00,0x4F,0x00,0x08,0x00,0x02,0x1D,0x05,0x1D,
0x05,0x1D,0x05,0x03,0x20,0x00,0x01,0x03,0x00,0x00,0x01,0x04,0x20,0x01,0x01,0x08,
0x07,0x20,0x02,0x01,0x12,0x19,0x11,0x1D,0x07,0x20,0x03,0x01,0x1D,0x05,0x08,0x08,
0x04,0x20,0x00,0x1D,0x05,0x0B,0x07,0x05,0x12,0x11,0x12,0x15,0x1D,0x05,0x1D,0x05,
0x02,0x05,0x20,0x01,0x01,0x1D,0x05,0x07,0x20,0x03,0x08,0x1D,0x05,0x08,0x08,0x0E,
0x07,0x07,0x12,0x11,0x12,0x11,0x12,0x15,0x1D,0x05,0x08,0x1D,0x05,0x02,0x05,0x20,
0x01,0x01,0x11,0x31,0x05,0x20,0x01,0x01,0x11,0x35,0x04,0x00,0x00,0x12,0x39,0x05,
0x20,0x01,0x1D,0x05,0x0E,0x04,0x20,0x00,0x12,0x3D,0x08,0x20,0x03,0x1D,0x05,0x1D,
0x05,0x08,0x08,0x0E,0x07,0x06,0x1D,0x05,0x1D,0x05,0x12,0x29,0x12,0x3D,0x1D,0x05,
0x1D,0x05,0x03,0x00,0x00,0x0E,0x05,0x00,0x02,0x0E,0x0E,0x0E,0x06,0x20,0x02,0x01,
0x0E,0x11,0x4D,0x03,0x20,0x00,0x0A,0x06,0x00,0x03,0x0E,0x0E,0x1C,0x1C,0x04,0x00,
0x01,0x01,0x0E,0x05,0x00,0x02,0x0E,0x1C,0x1C,0x04,0x00,0x01,0x01,0x02,0x15,0x07,
0x0B,0x0E,0x12,0x49,0x12,0x49,0x1D,0x05,0x1D,0x05,0x1D,0x05,0x1D,0x05,0x1D,0x05,
0x1D,0x05,0x08,0x02,0x08,0x01,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x1E,0x01,0x00,
0x01,0x00,0x54,0x02,0x16,0x57,0x72,0x61,0x70,0x4E,0x6F,0x6E,0x45,0x78,0x63,0x65,
0x70,0x74,0x69,0x6F,0x6E,0x54,0x68,0x72,0x6F,0x77,0x73,0x01,0xC4,0x2B,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xDE,0x2B,0x00,0x00,0x00,0x20,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xD0,0x2B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x5F,0x43,0x6F,0x72,0x44,0x6C,0x6C,0x4D,0x61,0x69,0x6E,0x00,0x6D,0x73,
0x63,0x6F,0x72,0x65,0x65,0x2E,0x64,0x6C,0x6C,0x00,0x00,0x00,0x00,0x00,0xFF,0x25,
0x00,0x20,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
0x10,0x00,0x00,0x00,0x18,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x80,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
0x00,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x58,0x40,0x00,0x00,0x54,0x02,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x02,0x34,0x00,0x00,0x00,0x56,0x00,
0x53,0x00,0x5F,0x00,0x56,0x00,0x45,0x00,0x52,0x00,0x53,0x00,0x49,0x00,0x4F,0x00,
0x4E,0x00,0x5F,0x00,0x49,0x00,0x4E,0x00,0x46,0x00,0x4F,0x00,0x00,0x00,0x00,0x00,
0xBD,0x04,0xEF,0xFE,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x01,0x00,0x56,0x00,0x61,0x00,0x72,0x00,
0x46,0x00,0x69,0x00,0x6C,0x00,0x65,0x00,0x49,0x00,0x6E,0x00,0x66,0x00,0x6F,0x00,
0x00,0x00,0x00,0x00,0x24,0x00,0x04,0x00,0x00,0x00,0x54,0x00,0x72,0x00,0x61,0x00,
0x6E,0x00,0x73,0x00,0x6C,0x00,0x61,0x00,0x74,0x00,0x69,0x00,0x6F,0x00,0x6E,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xB0,0x04,0xB4,0x01,0x00,0x00,0x01,0x00,0x53,0x00,
0x74,0x00,0x72,0x00,0x69,0x00,0x6E,0x00,0x67,0x00,0x46,0x00,0x69,0x00,0x6C,0x00,
0x65,0x00,0x49,0x00,0x6E,0x00,0x66,0x00,0x6F,0x00,0x00,0x00,0x90,0x01,0x00,0x00,
0x01,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x34,0x00,0x62,0x00,
0x30,0x00,0x00,0x00,0x2C,0x00,0x02,0x00,0x01,0x00,0x46,0x00,0x69,0x00,0x6C,0x00,
0x65,0x00,0x44,0x00,0x65,0x00,0x73,0x00,0x63,0x00,0x72,0x00,0x69,0x00,0x70,0x00,
0x74,0x00,0x69,0x00,0x6F,0x00,0x6E,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0x30,0x00,0x08,0x00,0x01,0x00,0x46,0x00,0x69,0x00,0x6C,0x00,0x65,0x00,0x56,0x00,
0x65,0x00,0x72,0x00,0x73,0x00,0x69,0x00,0x6F,0x00,0x6E,0x00,0x00,0x00,0x00,0x00,
0x30,0x00,0x2E,0x00,0x30,0x00,0x2E,0x00,0x30,0x00,0x2E,0x00,0x30,0x00,0x00,0x00,
0x40,0x00,0x0F,0x00,0x01,0x00,0x49,0x00,0x6E,0x00,0x74,0x00,0x65,0x00,0x72,0x00,
0x6E,0x00,0x61,0x00,0x6C,0x00,0x4E,0x00,0x61,0x00,0x6D,0x00,0x65,0x00,0x00,0x00,
0x74,0x00,0x65,0x00,0x73,0x00,0x74,0x00,0x65,0x00,0x6E,0x00,0x63,0x00,0x6F,0x00,
0x64,0x00,0x65,0x00,0x2E,0x00,0x64,0x00,0x6C,0x00,0x6C,0x00,0x00,0x00,0x00,0x00,
0x28,0x00,0x02,0x00,0x01,0x00,0x4C,0x00,0x65,0x00,0x67,0x00,0x61,0x00,0x6C,0x00,
0x43,0x00,0x6F,0x00,0x70,0x00,0x79,0x00,0x72,0x00,0x69,0x00,0x67,0x00,0x68,0x00,
0x74,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x48,0x00,0x0F,0x00,0x01,0x00,0x4F,0x00,
0x72,0x00,0x69,0x00,0x67,0x00,0x69,0x00,0x6E,0x00,0x61,0x00,0x6C,0x00,0x46,0x00,
0x69,0x00,0x6C,0x00,0x65,0x00,0x6E,0x00,0x61,0x00,0x6D,0x00,0x65,0x00,0x00,0x00,
0x74,0x00,0x65,0x00,0x73,0x00,0x74,0x00,0x65,0x00,0x6E,0x00,0x63,0x00,0x6F,0x00,
0x64,0x00,0x65,0x00,0x2E,0x00,0x64,0x00,0x6C,0x00,0x6C,0x00,0x00,0x00,0x00,0x00,
0x34,0x00,0x08,0x00,0x01,0x00,0x50,0x00,0x72,0x00,0x6F,0x00,0x64,0x00,0x75,0x00,
0x63,0x00,0x74,0x00,0x56,0x00,0x65,0x00,0x72,0x00,0x73,0x00,0x69,0x00,0x6F,0x00,
0x6E,0x00,0x00,0x00,0x30,0x00,0x2E,0x00,0x30,0x00,0x2E,0x00,0x30,0x00,0x2E,0x00,
0x30,0x00,0x00,0x00,0x38,0x00,0x08,0x00,0x01,0x00,0x41,0x00,0x73,0x00,0x73,0x00,
0x65,0x00,0x6D,0x00,0x62,0x00,0x6C,0x00,0x79,0x00,0x20,0x00,0x56,0x00,0x65,0x00,
0x72,0x00,0x73,0x00,0x69,0x00,0x6F,0x00,0x6E,0x00,0x00,0x00,0x30,0x00,0x2E,0x00,
0x30,0x00,0x2E,0x00,0x30,0x00,0x2E,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x20,0x00,0x00,0x0C,0x00,0x00,0x00,0xF0,0x3B,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
        private int newbps;
        private bool enableass;
    }
}
